Skip to content

Upgrade all default processing models to current versions#75

Merged
jeffgreendesign merged 3 commits intomainfrom
claude/check-model-upgrades-UUgCF
May 1, 2026
Merged

Upgrade all default processing models to current versions#75
jeffgreendesign merged 3 commits intomainfrom
claude/check-model-upgrades-UUgCF

Conversation

@jeffgreendesign
Copy link
Copy Markdown
Owner

  • claude-haiku-4-5-20250501 → claude-haiku-4-5-20251001 (Oct 2025)
  • claude-sonnet-4-6-20250514 → claude-sonnet-4-6 (Feb 2026)
  • whisper-1 → gpt-4o-mini-transcribe
  • text-embedding-004 (768d, shut down Jan 14 2026) → gemini-embedding-2-preview (3072d)

SQL schemas for Google AI provider updated to 3072-dimension vectors across
setup-db-google.sql, setup-db-insights-google.sql, and setup-db-conversation-google.sql.

https://claude.ai/code/session_01H2QAEqGW8uh7GxidzoGdSe

- claude-haiku-4-5-20250501 → claude-haiku-4-5-20251001 (Oct 2025)
- claude-sonnet-4-6-20250514 → claude-sonnet-4-6 (Feb 2026)
- whisper-1 → gpt-4o-mini-transcribe
- text-embedding-004 (768d, shut down Jan 14 2026) → gemini-embedding-2-preview (3072d)

SQL schemas for Google AI provider updated to 3072-dimension vectors across
setup-db-google.sql, setup-db-insights-google.sql, and setup-db-conversation-google.sql.

https://claude.ai/code/session_01H2QAEqGW8uh7GxidzoGdSe
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Building Building Preview, Comment Apr 30, 2026 8:50pm
textrawl Ready Ready Preview, Comment Apr 30, 2026 8:50pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a37ae42-ea66-4454-bfdf-48b83b957ff1

📥 Commits

Reviewing files that changed from the base of the PR and between dc1bd12 and d60deb4.

📒 Files selected for processing (1)
  • scripts/setup-db-conversation-google.sql
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/setup-db-conversation-google.sql

Walkthrough

This pull request updates LLM and embedding model defaults and related schema/types. Google embedding model changes from text-embedding-004 to gemini-embedding-2-preview, increasing embedding dimensionality from 768 → 3072 and updating SQL schema/function parameter types to VECTOR(3072). Anthropic extraction model is set to claude-haiku-4-5-20251001 and insight model to claude-sonnet-4-6. OpenAI audio transcription model is changed from whisper-1 to gpt-4o-mini-transcribe. Google embedding input truncation limit is increased from 10,000 to 30,000 characters.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description lists specific model upgrades and schema changes but deviates from the template structure with missing checklist items and Type of Change section. Complete the PR description template by filling in Type of Change, Checklist items, and explicitly confirming all testing and code style requirements have been met.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective: upgrading default processing models to current versions across Claude, OpenAI, and Google embedding providers.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/check-model-upgrades-UUgCF

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
README.md (1)

398-398: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Inconsistent dimension documented for Google AI.

Line 398 still states "Google AI 768d" but this PR changes Google embeddings to 3072 dimensions with gemini-embedding-2-preview. This should be updated for consistency.

📝 Proposed fix
-> **Note:** Each provider uses different embedding dimensions: OpenAI 1536d, Ollama 1024d (or 768d for v2-moe), Google AI 768d. Use the matching schema: `setup-db.sql` (OpenAI), `setup-db-ollama.sql` (Ollama 1024d), `setup-db-ollama-v2.sql` (Ollama 768d), or `setup-db-google.sql` (Google AI). You cannot mix providers without re-embedding all documents.
+> **Note:** Each provider uses different embedding dimensions: OpenAI 1536d, Ollama 1024d (or 768d for v2-moe), Google AI 3072d. Use the matching schema: `setup-db.sql` (OpenAI), `setup-db-ollama.sql` (Ollama 1024d), `setup-db-ollama-v2.sql` (Ollama 768d), or `setup-db-google.sql` (Google AI). You cannot mix providers without re-embedding all documents.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 398, Update the README sentence that lists embedding
dimensions so Google AI is shown as 3072d (matching the new
gemini-embedding-2-preview model) instead of 768d; also ensure the referenced
schema name setup-db-google.sql remains correct or note if a new schema (e.g.,
setup-db-google-3072.sql) is required so readers know which DB schema to use
when using gemini-embedding-2-preview.
scripts/setup-db-conversation-google.sql (1)

11-37: ⚠️ Potential issue | 🟠 Major

Existing databases upgrading from other embedding providers won't be migrated to 3072d

CREATE TABLE IF NOT EXISTS at lines 11 and 27 only affects fresh installs. If users upgrade from setup-db-conversation-ollama.sql (1024d) or setup-db-conversation.sql (1536d), existing conversation_sessions.summary_embedding and conversation_turns.embedding columns retain their original dimensions. The TypeScript callers in src/db/conversation-search.ts will attempt to inject 3072d vectors into mismatched columns, causing runtime errors. Add explicit migration steps to handle provider switches.

Suggested migration pattern
 CREATE TABLE IF NOT EXISTS conversation_turns (
   id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
   session_id UUID NOT NULL REFERENCES conversation_sessions(id) ON DELETE CASCADE,
   role TEXT NOT NULL CHECK (role IN ('user', 'assistant', 'system')),
   content TEXT NOT NULL,
   embedding VECTOR(3072),
   turn_index INTEGER NOT NULL,
   token_count INTEGER,
   metadata JSONB DEFAULT '{}',
   created_at TIMESTAMPTZ DEFAULT NOW(),
   UNIQUE (session_id, turn_index)
 );
+
+-- Upgrade existing installs from other embedding providers.
+-- Existing vectors must be re-embedded after this change.
+ALTER TABLE IF EXISTS conversation_sessions
+  ALTER COLUMN summary_embedding TYPE VECTOR(3072)
+  USING NULL;
+
+ALTER TABLE IF EXISTS conversation_turns
+  ALTER COLUMN embedding TYPE VECTOR(3072)
+  USING NULL;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/setup-db-conversation-google.sql` around lines 11 - 37, Existing
installs won't have their conversation_sessions.summary_embedding and
conversation_turns.embedding columns migrated to VECTOR(3072), so runtime errors
occur when TS code in src/db/conversation-search.ts writes 3072d vectors; add an
explicit migration in the DB setup that detects and converts older-dimension
vector columns (from 1024 or 1536 to 3072) instead of only using CREATE TABLE IF
NOT EXISTS in setup-db-conversation-google.sql. Implement the migration by
adding steps to the SQL script (or a new migration script) that: check current
column dimension for conversation_sessions.summary_embedding and
conversation_turns.embedding, create a temporary VECTOR(3072) column, copy
existing vectors into it (padding/truncating as needed), drop the old column,
and rename the temp column to the original name; apply the same logic when
switching from setup-db-conversation-ollama.sql or setup-db-conversation.sql so
the DB columns match the 3072d expected by the code.
🧹 Nitpick comments (1)
scripts/setup-db-google.sql (1)

1-4: 🏗️ Heavy lift

Consider adding migration guidance for existing Google embedding users.

Users with existing databases using the old text-embedding-004 (768d) embeddings will encounter dimension mismatches after upgrading. The schema change from vector(768) to vector(3072) requires either:

  1. Re-running the schema on a fresh database, or
  2. Dropping and recreating the embedding columns and re-embedding all documents

This is a breaking change for existing Google provider users. Consider documenting the migration path in the PR description or a migration guide.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/setup-db-google.sql` around lines 1 - 4, Update the schema file
comments to call out that switching from text-embedding-004 (vector(768)) to
gemini-embedding-2-preview (vector(3072)) is a breaking change for existing
Google embedding users and provide a short migration guide: describe the two
supported paths (create a fresh DB and run scripts/setup-db-google.sql, or for
existing DBs drop/recreate the embedding columns and re-run re-embedding for all
documents), mention re-running scripts/security-rls.sql after schema changes,
and suggest verifying embedding provider and dimension compatibility before
applying the schema; reference the provider names and dimension types
(text-embedding-004, gemini-embedding-2-preview, vector(768), vector(3072)) and
advise documenting this guidance in the PR description as well.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@README.md`:
- Line 398: Update the README sentence that lists embedding dimensions so Google
AI is shown as 3072d (matching the new gemini-embedding-2-preview model) instead
of 768d; also ensure the referenced schema name setup-db-google.sql remains
correct or note if a new schema (e.g., setup-db-google-3072.sql) is required so
readers know which DB schema to use when using gemini-embedding-2-preview.

In `@scripts/setup-db-conversation-google.sql`:
- Around line 11-37: Existing installs won't have their
conversation_sessions.summary_embedding and conversation_turns.embedding columns
migrated to VECTOR(3072), so runtime errors occur when TS code in
src/db/conversation-search.ts writes 3072d vectors; add an explicit migration in
the DB setup that detects and converts older-dimension vector columns (from 1024
or 1536 to 3072) instead of only using CREATE TABLE IF NOT EXISTS in
setup-db-conversation-google.sql. Implement the migration by adding steps to the
SQL script (or a new migration script) that: check current column dimension for
conversation_sessions.summary_embedding and conversation_turns.embedding, create
a temporary VECTOR(3072) column, copy existing vectors into it
(padding/truncating as needed), drop the old column, and rename the temp column
to the original name; apply the same logic when switching from
setup-db-conversation-ollama.sql or setup-db-conversation.sql so the DB columns
match the 3072d expected by the code.

---

Nitpick comments:
In `@scripts/setup-db-google.sql`:
- Around line 1-4: Update the schema file comments to call out that switching
from text-embedding-004 (vector(768)) to gemini-embedding-2-preview
(vector(3072)) is a breaking change for existing Google embedding users and
provide a short migration guide: describe the two supported paths (create a
fresh DB and run scripts/setup-db-google.sql, or for existing DBs drop/recreate
the embedding columns and re-run re-embedding for all documents), mention
re-running scripts/security-rls.sql after schema changes, and suggest verifying
embedding provider and dimension compatibility before applying the schema;
reference the provider names and dimension types (text-embedding-004,
gemini-embedding-2-preview, vector(768), vector(3072)) and advise documenting
this guidance in the PR description as well.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e665df9-6c02-4990-82bb-266a86824eb6

📥 Commits

Reviewing files that changed from the base of the PR and between 44af70e and d9d408e.

📒 Files selected for processing (9)
  • .env.example
  • CLAUDE.md
  • README.md
  • scripts/setup-db-conversation-google.sql
  • scripts/setup-db-google.sql
  • scripts/setup-db-insights-google.sql
  • src/services/audio-processor.ts
  • src/services/embeddings.ts
  • src/utils/config.ts

- README.md:398: fix Google AI dimension note (768d → 3072d)
- setup-db-google.sql: add breaking-change header explaining the vector space
  incompatibility between text-embedding-004 and gemini-embedding-2-preview,
  with Option A (fresh DB) and Option B (existing DB column migration) paths
- setup-db-conversation-google.sql: add DO block migration that detects
  conversation_sessions.summary_embedding and conversation_turns.embedding
  columns with non-3072 dimensions and drops/recreates them; old embeddings
  are dropped (not padded/truncated) because the models occupy different
  vector spaces

https://claude.ai/code/session_01H2QAEqGW8uh7GxidzoGdSe
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/setup-db-conversation-google.sql`:
- Around line 150-151: The section header "Search Functions (768 dimensions)" is
stale; update that header to "Search Functions (3072 dimensions)" (or otherwise
reflect VECTOR(3072)) so the comment matches the actual function signatures that
use VECTOR(3072); locate the header string in
scripts/setup-db-conversation-google.sql and change it to the 3072-dimension
wording to avoid migration confusion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cef7f150-2b86-4600-99fa-cf7c0cf5e1d6

📥 Commits

Reviewing files that changed from the base of the PR and between d9d408e and dc1bd12.

📒 Files selected for processing (3)
  • README.md
  • scripts/setup-db-conversation-google.sql
  • scripts/setup-db-google.sql
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/setup-db-google.sql

Comment thread scripts/setup-db-conversation-google.sql Outdated
Update "Search Functions (768 dimensions)" comment to match the
actual VECTOR(3072) function signatures below it.

https://claude.ai/code/session_01H2QAEqGW8uh7GxidzoGdSe
@jeffgreendesign jeffgreendesign merged commit 25209e4 into main May 1, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants